package com.wntime.simulator.web.vo;

import com.wntime.simulator.device.Simulator;
import lombok.Data;

import java.io.Serializable;

@Data
public class SimulatorVo implements Serializable {
    private static final long serialVersionUID = 1L;
    private String id;
    private String name;
    private String type;

    private Integer port;
    private int poolSize;
    private Boolean overTcp = false;
    private int uintId;

    public Simulator toSimulator(SimulatorVo simulator) {
        Simulator simula= new Simulator();
        simula.setId(simulator.getId());
        simula.setName(simulator.getName());
        simula.setType(simulator.getType());
        simula.setPort(simulator.getPort());
        simula.setPoolSize(simulator.getPoolSize());
        simula.setOverTcp(simulator.getOverTcp());
        simula.setUintId(simulator.getUintId());
        return simula;
    }
}
